import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridLayout;

import javax.swing.JLabel;


public class ScoreLabel extends JLabel {
	private int score;
	private JLabel name = new JLabel();
	private JLabel scores = new JLabel();
	public ScoreLabel(int n) {
		setLayout(new GridLayout(5,1));
		setVerticalAlignment(NORTH);
		scores.setHorizontalAlignment(CENTER);
		name.setHorizontalAlignment(CENTER);
		
		name.setFont(new Font("Sans Serif", Font.BOLD, 24));
		scores.setFont(new Font("Sans Serif", Font.BOLD, 47));
		score = 0;
		name.setText("Player" + n);		
		scores.setText("0");
		add(name);
		add(scores);
		setPreferredSize(new Dimension(150, 500));
		setVisible(true);
	}
	
	public int getScore() {
		return score;
	}
	
	public void setScore(int i) {
		scores.setText("" + i);	
	}
}
